package wangwenjun.phase2.concurrencypattern.activeobject.staticproxy.framework;

import wangwenjun.phase2.concurrencypattern.activeobject.staticproxy.OrderService;

import java.util.Map;

/**
 * @author ChangLiang
 * @date 2020/6/17
 */
class OrderCreateMessage extends OrderServiceMessage {

    public OrderCreateMessage(Map<String, Object> params, OrderService orderService) {
        super(params,orderService);
    }

    @Override
    public void execute() {
        String account = (String) params.get("account");
        long orderId = (long) params.get("orderId");
        // 执行真正的order 方法
        orderService.createOrder(account, orderId);
    }
}
